package com.dz.lm.dao.agent.read;

import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.dz.lm.common.exception.DaoException;
import com.dz.lm.common.utils.stereotype.ReaderRepository;

@ReaderRepository("readAgentDao")
public interface AgentDao {
	
	Map<String, Object> qry1LevelAgentByUserId(@Param("userId") Integer userId) throws DaoException;
	
	Map<String, Object> qry2LevelAgentByUserId(@Param("userId") Integer userId) throws DaoException;
	
    /**
     * 通过userId与barId查询该用户是否已申请该钱吧的代理人
     */
	Map<String, Object> qryAgentInfoByUserIdToBarId(Map<String, Object> param) throws DaoException;
	
    /**
     * 通过userId查询该用户是否已申请该钱吧的代理人
     */
	Map<String, Object> qryAgentInfoByUserId(Map<String, Object> param) throws DaoException;
	
    /**
     * 通过userId查询该用户的二级代理人数
     */
	int qry2LevelAgentByUserIdCount(Map<String, Object> param) throws DaoException;
	
    /**
     * 通过userId查询该用户是否已代理二级代理产品
     */
	int qryIs2LevelAgentByUserIdCount(Map<String, Object> param) throws DaoException;	
}